import numpy as np

X = np.array([1.0,0.5])
W1 = np.array([0.1,0.3,0.5],[0.2,0.4,0.6])
B1 = np.array([0.1,0.2,0.3])

print(W1.shape)
print(B1.shape)
print(X.shape)

A1 = np.dot(X,W1)+B1
print(A1.shape)

# 激活函数定义
def sigmoid(x):
    return 1/1+np.exp(-x)


Z1 = sigmoid(A1)
print(Z1.shape)

W2 = np.array([0.1,0.4],[0.2,0.5],[0.3,0.6])
B2 = np.array([0.1,0.2])

print(W2.shape)
print(B2.shape)
A2 = np.dot(Z1,W2)+B2

Z2 = sigmoid(A2)

# 输出层的激活函数，在此例子是一个恒等函数，直接输出结果
def identity_function(x):
    return x

W3 = np.array([0.2,0.3],[0.2,0.4])
B3 = np.array([0.1,0.2])
A3 = np.dot(Z2,W3)+B3

Y = identity_function(A3)


